<template>
    <div>
        <div class="content">
            <div class="title">
                联系我们
            </div>
            <p>专业提供实验室用低温操作台（工作台）、血液低温操作台（工作台） 医用洁净工作台、低温洁净工作台、低温配血台、血液配血台、低温操作台（工作台）价格、低温操作台（工作台）厂家</p>
            <div class="span"></div>

            <div class="message">
                <div class="item">
                    <div class="top-title">
                        公司地址
                    </div>
                    <span></span>

                    <div class="message-title">
                        {{ webMessage.dizhi }}
                    </div>
                </div>
                <div class="item">
                    <div class="top-title">
                        服务热线
                    </div>
                    <span></span>
                    <div class="message-title">
                        {{ webMessage.tel1 }}
                    </div>

                </div>
                <!-- <div class="item">
                    <div class="top-title">
                        手机
                    </div>
                    <span></span>

                    <div class="message-title">
                        {{ webMessage.tel2 }}
                    </div>

                </div>
                <div class="item">
                    <div class="top-title">
                        邮箱
                    </div>
                    <span></span>

                    <div class="message-title">
                        {{ webMessage.email }}
                    </div>
                </div> -->
            </div>

            <div class="img-box">
                <img class="img" :src="base64Img(webMessage.ditu)" alt="" v-if="webMessage.ditu">
            </div>
        </div>
    </div>
</template>

<script setup>

import { getWebXinxi } from '@/api/viewapi.js'
import { ref, onMounted } from 'vue';
import { base64Img } from '@/tools/tools.js'
const webMessage = ref({})

const getWebMessage = () => {
    getWebXinxi('2').then((res) => {
        webMessage.value = res.data.data
        console.log(res);
    })
}

onMounted(() => {
    getWebMessage()
});
</script>

<style lang="scss" scoped>
/* pc */
@media (min-width: 800px) {
    .content {
        max-width: 1400px;
        margin: 0 auto;

        .title {
            text-align: center;
            font-size: 30px;
            padding: 20px;

        }

        p {
            padding-bottom: 20px;
            color: #a9a9a9;
            font-size: 14px;
            text-align: center;
        }

        .span {
            width: 100%;
            background-color: #a9a9a9;
            height: 1px;
        }

        .message {
            margin-top: 20px;
            display: flex;
            margin-bottom: 20px;
            justify-content: space-evenly;
            .item {
                border: 1px solid gainsboro;
                width: 600px;
                border-radius: 10px;
                padding-top: 20px;

                .top-title {
                    text-align: center;
                    font-size: 22px;
                    margin-bottom: 20px;
                }

                span {
                    width: 560px;
                    display: block;
                    margin: 0 20px 0 20px;
                    height: 1px;
                    background-color: #a9a9a9;
                }

                .message-title {
                    padding: 20px 0;
                    text-align: center;
                    font-size: 20px;

                }
            }
        }

        .img-box {
            border: 1px solid gainsboro;
            border-radius: 20px;
            margin-bottom: 20px;

            .img {
                width: 100%;
                height: 550px;
            }
        }
    }
}

/* phone */
@media screen and (max-width: 799px) {
    .content {
        max-width: 1400px;
        margin: 0 auto;
        padding: 10px;

        img {
            width: 100%;
        }

        .title {
            display: none;
        }
        p {
            font-size: 20px ;
            line-height: 30px;
        }
        .message {
            .item {
                margin-top: 10px;
                .top-title {
                    font-size: 19px;
                }
            }
        }
    }
}
</style>
